C.S.M.P. Digest             Sat, 12 Oct 96       Volume 4 : Issue 10
 
Today's Topics:
 
        A INIT Problem..If HELPED you get it FREE !
        Apple Events and other meanderings...
        AppleGlot 2.2! Where?
        AppleScript to copy an http address and launch Netscape??
        Copying the data from a GWorld to a resource
        Example INIT code needed (avoiding tail patch)
        FairCom's c-tree Plus?
        File Manager Bug?
        Gamma Fades mess up the cursor!
        Getting Map (Time Zone etc) info? FutureBasic?
        Inside Mac
        JPEG I-O with QuickTime?
        JPEG Libraries?
        Names of files and subdirectories in a directory?  DirId from path?
        Palette Problems
        Pop-up Menus and the Space-Time Continuum
        PowerPlant works under Symantec!
        Preemptive scheduled threads
        Printing Thin Lines?
        Printing thin lines?
        Q: Long computation in a board game
        Question about printf
        Quick Basic
        Register-level programming for PowerPC - National instruments DAQ board
        Selectionsort in C
        Simple Programming Game?
        Smacker utilities are now FREE!
        SndNewChannel(<localvar>... crashes. Why?
        SoundLib Shared Library Problem
        The Metrowerks API!
        Using MacApp with Symantec C++ 7.0 (68k)
        Why aren't certain low-mem accessors available in PPC?
        [Q] Dialog + List + EditField + Keyboard Focus
        [Q] Passing a function as an argument
        drawing sound wave
        how can I drive Stuffit from an app?
        problems building ASLM with CodeWarrior MPW
        redirection w- CW 10?
        rowbytes & screendepth?
        sound squeels



The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
(marka@ee.mcgill.ca).

The digest is a collection of article threads from the internet
newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
csmp.games. It is designed for people who read news semi-regularly and
want an archive of the discussions.  If you don't know what a
newsgroup is, you probably don't have access to it. Ask your systems
administrator(s) for details. If you don't have access to news, you
may still be able to post messages to the group by using a mail server
like anon.penet.fi (mail help@anon.penet.fi for more information).

Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject.  The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
ee.mcgill.ca).  Article threads are not added to the digest until the last
article added to the thread is at least two weeks old (this is to ensure that
the thread is dead before adding it to the digest).  Article threads that
consist of only one message are generally not included in the digest.

The digests can be obtained by email, ftp or through the World Wide Web.

If you want to receive the digest by mail, send email to 
majordomo@ee.mcgill.ca with no subject and one of the following commands
as body:

    help		                Sends you a summary of commands
    subscribe csmp                      Adds you to the mailing list
    unsubscribe csmp                    Removes you from the list

Once you have subscribed, you will automatically receive each new
issue as it is created.

Back issues are available by ftp from Info-Mac mirror sites in the
per/csmp subdirectory, e.g.

  ftp://sumex-aim.stanford.edu/info-mac/per/csmp/

The contents of all back issues can be searched by accessing the
following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):

    http://marvin.stattech.com.au/search.html

They can also be searched through the following URLs, thanks to
Tim Tuck (Tim.Tuck@sensei.com.au):

    http://wais.sensei.com.au/searchform.html
    wais://wais.sensei.com.au:210/csmp?

-------------------------------------------------------

>From adrianb@real.net.au (Adrian Bourke)
Subject: A INIT Problem..If HELPED you get it FREE !
Date: Fri, 27 Sep 1996 07:32:13 +0100
Organization: Unknown Organisation

hi.

I am making an extension.  I want to replace some System Resources(
windows ), HOW do i Do THAT ?

Please Help
Adrian Bourke

+++++++++++++++++++++++++++

>From heksterb@netvision.net.il (Ben Hekster)
Date: Fri, 27 Sep 1996 09:34:38 +0200
Organization: NetVision LTD.

Hi--

In article <adrianb-2709960732130001@sydney12.real.net.au>,
adrianb@real.net.au (Adrian Bourke) wrote:
> I am making an extension.  I want to replace some System Resources(
> windows ), HOW do i Do THAT ?

Have the INIT open a resource file and leave it open.  Then, when someone
calls GetResource they get your copy (unless they do UseResFile(0) first).

        Another idea, get the System resource, and SetHandleSize to the
size of your copy.  Mark it unpurgeable and BlockMove your data straight
into the resource.

        Or, load your resource into the System heap, call RsrcMapEntry and
replace the resource map entry with your resource.  Mark the resource
unpurgeable, and dispose of the System's copy (and hope that no-one else
was already using it).

I would probably go with option #2.

(follow-ups redirected)

Ben

+++++++++++++++++++++++++++

>From mouser@zercom.net (Martin-Gilles Lavoie)
Date: 27 Sep 1996 14:20:02 GMT
Organization: Groupimage, inc.

In article <heksterb-2709960934380001@ben.odyssey.co.il>,
heksterb@netvision.net.il (Ben Hekster) wrote:

> Hi--
> 
> In article <adrianb-2709960732130001@sydney12.real.net.au>,
> adrianb@real.net.au (Adrian Bourke) wrote:
> > I am making an extension.  I want to replace some System Resources(
> > windows ), HOW do i Do THAT ?
> 
> Have the INIT open a resource file and leave it open.  Then, when someone
> calls GetResource they get your copy (unless they do UseResFile(0) first).
> 
>         Another idea, get the System resource, and SetHandleSize to the
> size of your copy.  Mark it unpurgeable and BlockMove your data straight
> into the resource.
> 
>         Or, load your resource into the System heap, call RsrcMapEntry and
> replace the resource map entry with your resource.  Mark the resource
> unpurgeable, and dispose of the System's copy (and hope that no-one else
> was already using it).
> 
> I would probably go with option #2.
> 
> (follow-ups redirected)
> 
> Ben

Your INIT can also patch GetResource, Get1Resource, GetIndResource and
Get1IndResource, and check weither someone is attempting to load WIND/DLOG
resources with IDs of those you whish to replace.  At this point,
substitute your own IDs, and call the original trap.

-- 
Martin-Gilles Lavoie
"The only trinary-state binary system known to live"
[Develop issue 24, page 4]

---------------------------

>From lottsim@aol.com (LOTTSIM)
Subject: Apple Events and other meanderings...
Date: 27 Sep 1996 23:08:28 -0400
Organization: America Online, Inc. (1-800-827-6364)

I'm trying to send an 'odoc' AppleEvent to the finder; however, I'm
sending it from an INIT.

I have the FSSpec, so where can I go from there?  I know that since INITs
don't have event loops, I can't go about doing this the regular way...

All I want is to have my INIT open files, folders, and control panels. 
It's done all the time, too...so it can't be that hard.

Thanks ahead of time!

Alex Rampell

+++++++++++++++++++++++++++

>From djembe@sprynet.com (Mike Cohen)
Date: Sat, 28 Sep 1996 15:26:41 -0600
Organization: ISIS International

Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

In article <52i4rc$qo6@newsbf02.news.aol.com>,
lottsim@aol.com (LOTTSIM) wrote:

>I'm trying to send an 'odoc' AppleEvent to the finder; however, I'm
>sending it from an INIT.
>
>I have the FSSpec, so where can I go from there?  I know that since INITs
>don't have event loops, I can't go about doing this the regular way...
>
>All I want is to have my INIT open files, folders, and control panels. 
>It's done all the time, too...so it can't be that hard.
>
>Thanks ahead of time!
>
>Alex Rampell

The finder doesn't support the 'odoc' event. Instead, it takes an "Open
Selection" event (I think it's class 'fndr' ID 'sope'). You can find it
documented in the AppleEvent Registry. I don't remember the URL for it, but
I have a pointer to it at http://www.isis-intl.com/faq.html.


[ Mike Cohen | djembe@pobox.com | http://pobox.com/~djembe (personal) ]
[            | isis@pobox.com   | http://www.isis-intl.com/ (company) ]
[     Harry Browne for President - http://www.harrybrowne96.org       ]


---------------------------

>From rvirta@utu.fi (Risto Virtanen)
Subject: AppleGlot 2.2! Where?
Date: Thu, 26 Sep 1996 22:26:02 +0300
Organization: Turku School of Economics

Where can I download the latest AppleGlot?
My web search pointed to various Apple sites:

http://dev2.info.apple.com/FTPIndices/App-3.html
or 
http://dev3.info.apple.com/FTPIndices/A-5.html

but none of them worked because:
 
Netscape Proxy was unable to locate the server: dev2.info.apple.com.
The server does not have a DNS entry.

Is there any FTP-site that does have DNS entry?!
Please help, thank you.

-- 
Windows95 - "You make a grown man cry." - Rolling Stones
This posting contains nobody's opinions; just pure facts.

+++++++++++++++++++++++++++

>From Risto Virtanen <rvirta@utu.fi>
Date: 27 Sep 1996 20:15:08 GMT
Organization: Turku School of Economics

In article <rvirta-2609962226020001@lake07.tukkk.fi> Risto Virtanen,
rvirta@utu.fi writes:
>Where can I download the latest AppleGlot?

Now I found it:
http://devworld.apple.com/dev/techsupport/ftpindices/App-3.html
There are version 2.3 and even newer betas plus manuals :-) 

And if you didn't know AppleGlot is for software localization...

---------------------------

>From rbest@pixi.com (Ryan)
Subject: AppleScript to copy an http address and launch Netscape??
Date: 17 Sep 1996 20:42:32 GMT
Organization: n/a

I'm running a filemaker Pro database and want an AppleScript to do the
following:

- copy an http address from a field
- launch Netscape
- paste the http address into the URL field of Netscape
- and press 'return' or whatever to go to that address.

(alternatively if there is a way of feeding the http address to Netscape
at the time of the launching, that would be even better!)


I know how to copy the http address from a field and launch netscape
already (not a big deal), but how do I paste the http address into the URL
field of netscape????

Thanks a bunch if you can help :)

+++++++++++++++++++++++++++

>From awiner@oracle.com (Adam Winer)
Date: Fri, 20 Sep 1996 12:43:00 -0800
Organization: Oracle Corporation

In article <3242C9C7.391D@email.mot.com>, ttg232@email.mot.com wrote:

> Ryan wrote:
> > 
> > I'm running a filemaker Pro database and want an AppleScript to do the
> > following:
> > 
> > - copy an http address from a field
> > - launch Netscape
> > - paste the http address into the URL field of Netscape
> > - and press 'return' or whatever to go to that address.
> > 
> > (alternatively if there is a way of feeding the http address to Netscape
> > at the time of the launching, that would be even better!)
> > 
> > I know how to copy the http address from a field and launch netscape
> > already (not a big deal), but how do I paste the http address into the URL
> > field of netscape????
> > 
> > Thanks a bunch if you can help :)
> 
> This is probably not the answer you expect but might give you an idea 
> for a workaround.
> I found that you can create a text file with the URL and give it the 
> type URL and creator MOSS. If you start this file, it will open Netscape 
> with that URL. If you find a way to script that, I guess it would do 
> what you want. I don't know too much about apple script, but if you 
> manage to get this working, I'd be pretty much interested.

To get Netscape to go to a certain URL, use:

tell "Netscape"
  GetURL "http://www.bogus.com"
end tell

This same command will also work with Cyberdog, Mosaic,
and, I presume, Internet Explorer.

-- Adam Winer
awiner@us.oracle.com

-- 
Adam Winer
awiner@us.oracle.com
Technical Staff, Oracle Corp.

+++++++++++++++++++++++++++

>From Christof Kettner <ttg232@email.mot.com>
Date: Fri, 20 Sep 1996 18:43:51 +0200
Organization: Motorola

Ryan wrote:
> 
> I'm running a filemaker Pro database and want an AppleScript to do the
> following:
> 
> - copy an http address from a field
> - launch Netscape
> - paste the http address into the URL field of Netscape
> - and press 'return' or whatever to go to that address.
> 
> (alternatively if there is a way of feeding the http address to Netscape
> at the time of the launching, that would be even better!)
> 
> I know how to copy the http address from a field and launch netscape
> already (not a big deal), but how do I paste the http address into the URL
> field of netscape????
> 
> Thanks a bunch if you can help :)

This is probably not the answer you expect but might give you an idea 
for a workaround.
I found that you can create a text file with the URL and give it the 
type URL and creator MOSS. If you start this file, it will open Netscape 
with that URL. If you find a way to script that, I guess it would do 
what you want. I don't know too much about apple script, but if you 
manage to get this working, I'd be pretty much interested.

-- 
Best regards,                 **** Avoid printing what you can view ****
Christof                      ****   on your screen. Save a twig!   ****
========================================================================
Christof Kettner | Senior Programmer / Analyst
Motorola GmbH    | Technical Services + European Print Technology 
Center
Schatzbogen 7    | Voice: +49-89-92103-207       Fax: +49-89-92103-230
D-81829 Muenchen | Email: TTG232@EMAIL.MOT.COM

+++++++++++++++++++++++++++

>From Forrest Johnson <windle@ti.com>
Date: 28 Sep 1996 02:58:44 GMT
Organization: Fred's Fill Dirt & Croissants


>Ryan wrote:
>> 
>> I'm running a filemaker Pro database and want an AppleScript to do the
>> following:
>> 
>> - copy an http address from a field
>> - launch Netscape
>> - paste the http address into the URL field of Netscape
>> - and press 'return' or whatever to go to that address.
>> 
>> (alternatively if there is a way of feeding the http address to Netscape
>> at the time of the launching, that would be even better!)
>> 
>> I know how to copy the http address from a field and launch netscape
>> already (not a big deal), but how do I paste the http address into the URL
>> field of netscape????
>> 

You can send the OpenURL command directly to Netscape.  This command will
also launch Netscape if it isn't already open.  Use Script Editor to look
at the Netscape scripting dictionary for the exact syntax.  I forget the
exact code, but it would look something like:

Tell app "netscape"
  OpenURL urlstring
end tell

---------------------------

>From g-kendall@nwu.edu (Brian Kendall)
Subject: Copying the data from a GWorld to a resource
Date: Wed, 25 Sep 1996 17:17:13 -0400
Organization: Programmer


Hi there!


I'd like to know how you'd copy the data from a GWorld's baseAddr to a
resource so it could be called up later (by using a function like
GetResource or something). I tried to use BlockMoveData to a resource
handle (obvoiusly a bad move) and my computer crashed afterward. This is
definatly not the way to do it. 

Any help would be great!


Brian K.

‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
"If you take cranberries and stew them like apple sauce, it tastes
much more like prunes then rhubarb does." ‹ Groucho Marx
‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹

+++++++++++++++++++++++++++

>From Eric Shieh <erics@edify.com>
Date: Thu, 26 Sep 1996 10:17:16 -0700
Organization: Edify Corporation

Brian Kendall wrote:
> 
> I'd like to know how you'd copy the data from a GWorld's baseAddr to a
> resource so it could be called up later (by using a function like
> GetResource or something). I tried to use BlockMoveData to a resource
> handle (obvoiusly a bad move) and my computer crashed afterward. This is
> definatly not the way to do it.
> 
You should be able to treat the baseAddr as any other pointer, after
you do a LockPixels. Your code should look roughly (i never remember
the exact toolbox names) like:

Rect boundsRect;
PixMapHandle pixMap;
Handle handleToWriteOut;
long pixMapSize;
short rowBytes;
short height;
short depth;

pixMap=GetGWorldPixMap(GWorldToWriteOut);

depth=(*pixMap)->pixelSize;

boundsRect=(*pixMap)->boundsRect;
height=boundsRect.bottom-boundsRect.top;

rowBytes=(*pixMap)->rowBytes&0x3FFF;//top bits are used internally by QD

pixMapSize=rowBytes*height*depth/8;//depth is in bits, so we divide by 8
to get bytes

handleToWriteOut=NewHandle(pixMapSize);
//make sure you have enough memory!

LockPixels(pixMap);
HLock(handleToWriteOut);

BlockMoveData((*pixMap)->baseAddr,*handleToWriteOut,pixMapSize);
//BlockMoveData isn't supposed to move memory, so we actually don't
//need to lock anything...but just in case..

HUnlock(handleToWriteOut);
UnlockPixels(pixMap);

//
//Write out the handle to a resource...


Hope this helps..


Eric

+++++++++++++++++++++++++++

>From dkj@apple.com (Dave Johnson)
Date: Fri, 27 Sep 1996 10:39:50 -0700
Organization: Apple Computer, Inc.

In article <g-kendall-2509961717130001@lucky113.nuts.nwu.edu>,
g-kendall@nwu.edu (Brian Kendall) wrote:

> Hi there!
> 
> 
> I'd like to know how you'd copy the data from a GWorld's baseAddr to a
> resource so it could be called up later (by using a function like
> GetResource or something). I tried to use BlockMoveData to a resource
> handle (obvoiusly a bad move) and my computer crashed afterward. This is
> definatly not the way to do it. 
> 
> Any help would be great!
> 
> 
> Brian K.

You can do as one poster suggested and convert the bit image data to a
handle, then write that out as some kind of resource, but perhaps a better
idea (and simpler, code-wise) is to write it out as a PICT resource. Set
the port to your GWorld, call OpenPicture, Copybits the GWorld onto
itself, call ClosePicture, then write the resulting PicHandle out as a
resource of type 'PICT'. This has the added advantages of storing any
color tables along with the data, and that PICT is a snadard type that can
vbe viewed in REsedit, opened and correctly interpreted by other apps,
etc.

Dave Johnson
dkj@apple.com

---------------------------

>From alex@metcalf.demon.co.uk (Alex Metcalf)
Subject: Example INIT code needed (avoiding tail patch)
Date: Sun, 22 Sep 1996 16:23:52 GMT
Organization: (none)

Hi,

     I'm looking around all over the place for some example code,
preferably CW, which does a patch without it being a tail patch. I managed
to roll it a while ago in THINK C, but now in CW I'm a bit stumped now
that I can't just slap in some asm into the middle of a patch function.
Does anyone have anything?

     Thanks in advance,




     Alex

--
Alex Metcalf
alex@metcalf.demon.co.uk

+++++++++++++++++++++++++++

>From sw@nan.co.uk (Sak Wathanasin)
Date: Fri, 27 Sep 1996 08:44:52 GMT
Organization: Network Analysis Ltd

In article <alex-2209961724480001@metcalf.demon.co.uk>,
alex@metcalf.demon.co.uk (Alex Metcalf) wrote:

> I managed
> to roll it a while ago in THINK C, but now in CW I'm a bit stumped now
> that I can't just slap in some asm into the middle of a patch function.

Oh yes, you can: you have to use the inline form of the function definition
like so:

        // works for both Think and MW (and I daresay MPW...)
        #pragma parameter MT_INTOFF(__A0)
        extern void MT_INTOFF(UInt16* mt_store)
                THREEWORDINLINE(0x40D0, 0x007C, 0x2700);
                // MOVE      SR,(A0)
                // ORI.W     #$2700,SR

        #pragma parameter MT_INTON(__D0)
        extern void MT_INTON(UInt16 mt_store)
                ONEWORDINLINE(0x46C0);
                // MOVE      D0,SR

then the compiler will inline the function when you call it.

-- 
Sak Wathanasin
Network Analysis Limited
178 Wainbody Ave South, Coventry CV3 6BX, UK

Internet: sw@nan.co.uk 
uucp:     ...!britain.eu.net!nan!sw
Phone: (+44) 1203 419996                              Fax: (+44) 1203 690690

---------------------------

>From altura@aol.com (ALTURA)
Subject: FairCom's c-tree Plus?
Date: 27 Sep 1996 13:56:41 -0400
Organization: America Online, Inc. (1-800-827-6364)

I'm looking for comments/opinions on FairCom's c-tree Plus. Anything at
all would be appreciated.

==========================
Jordan Zimmerman
jordanz@altura.com
http://www.altura.com/jordanz
http://www.altura.com/jordanz/spocks_beard - Great Prog Rock band
Who is John Galt?

+++++++++++++++++++++++++++

>From dent@highway1.com.au (Andy Dent)
Date: Sun, 29 Sep 1996 09:47:24 +0800
Organization: A.D. Software

In article <52h4gp$cgj@newsbf02.news.aol.com>, altura@aol.com (ALTURA) wrote:

>I'm looking for comments/opinions on FairCom's c-tree Plus. Anything at
>all would be appreciated.

Jordan

I'm very happy with c-tree, so happy that I did a poor man's version of
the shaver ad - I didn't buy the company, but I *did* base our new
products on it.

OOFILE allows for replaceable backends (ram-based and dBase are current
alternatives) but the main use is with c-tree as a backend. We've had
clients and beta testers using c-tree on a wide range of hardware for two
years, including Suns, Macs (natch), Wintel and various other Unix.

The portable files are excellent - one of our most demanding users is my
ISP who run multi-million record accounting databases (all their TCP/IP
flows). The tech there recently just copied the files to his PowerStation
for the monthly account run, due to Sun problems, and was impressed to
find the programs ran significantly faster than on the SPARCStation.

I've had a multi-user (just filesharing) c-tree database going for years
running from 2Mb Classics over Localtalk to a IIci. This is a classified
advertisements publishing system used in a weekly magazine. Performance is
amazingly fast for the hardware (eg: under 1 second from typing Agent No
to display of Agent details).

One of our more recent OOFILE clients bought it because he knows c-tree
well, just wants an easier interface on top. He's using Optima++ on
Windows and wanted something based on c-tree rather than the Watcom SQL
provided with Optima++ because of the better performance/overhead of
c-tree.

The Faircom page (www.faircom.com) lists a lot of clients, with firms like
Alcatel actually building the server into their PABX boxes.

Finally, I'm also very happy with the responsiveness of their tech
support, apart from being stung an extra $100 (freight allowance) for
being a foreign client.

Andy Dent, Product Architect, A.D. Software, Western Australia
OOFILE - "the cross-platform OODBMS that speaks c++"
ftp://ftp.highway1.com.au/pub/adsoftware/oofile/
http://www.highway1.com.au/adsoftware/oofile.html

---------------------------

>From joe_neufeld@bmug.org (joe neufeld)
Subject: File Manager Bug?
Date: Thu, 26 Sep 96 13:30:03 -0700
Organization: BMUG, Inc.

_Inside Macintosh: Files_, page 2-160 states:
"You can use the FSpGetFInfo function to obtain the Finder information about a
file or directory."

Why, then, when I pass in an FSSpec describing a directory, the function
returns error code -43 (file not found). It's true, though, that the function
did not find a file (because I passed in a folder), but IM says that the
function accepts folders.

I've worked around this problem by calling PBGetCatInfo instead, but I just
wanted to know if I'm doing something wrong, or the documentation is wrong.


+++++++++++++++++++++++++++

>From jumplong@aol.com (Jump Long)
Date: 28 Sep 1996 14:11:19 -0400
Organization: America Online, Inc. (1-800-827-6364)

joe neufeld wrote:
>_Inside Macintosh: Files_, page 2-160 states: "You can use the
>FSpGetFInfo function to obtain the Finder information about a
>file or directory."
>
>Why, then, when I pass in an FSSpec describing a directory, the
>function returns error code -43 (file not found). It's true,
>though, that the function did not find a file (because I passed
>in a folder), but IM says that the function accepts folders.
>
>I've worked around this problem by calling PBGetCatInfo instead,
>but I just wanted to know if I'm doing something wrong, or the
>documentation is wrong.

That's a documentation error that is corrected in the Macintosh TechNote
"Inside Macintosh-Files Errata"
<http://devworld.apple.com/dev/technotes/im_errata/im_errata_01.html>

MoreFiles <ftp://members.aol.com/JumpLong/MoreFiles_1.4.3.sea.hqx> has
routines FSpGetDInfo and FSpSetDInfo that work on directories.

- Jim Luther

---------------------------

>From jstiles@uclink4.berkeley.edu (John Stiles)
Subject: Gamma Fades mess up the cursor!
Date: Mon, 23 Sep 1996 20:33:22 -0800
Organization: University of California, Berkeley

I have a new PowerCenter 150 with somewhat accelerated video (it's got the
same QuickDraw acceleration chip as a 7200 does). I'm not sure if the
acceleration chip is the cause of my problem, but it might shed some
light. 

Anyway, my software (Skittles) has one weird glitch. Doing a gamma fade
while in Thousands of Colors invariably causes the white edging around the
arrow cursor to turn solid black. This makes the cursor both ugly and hard
to see. The easy workaround is to change the cursor to some other shape
then turn it back, but this isn't exactly pretty (it would probably make a
weird flicker). It doesn't happen in 256 colors. (However, it does happen
if a gamma fade occurs at thousands of colors, the screen mode is changed
to 256 colors, then the screen is faded back in.)

Other applications seem to cause this to occur as well; a good example is
the Power Dimmer screensaver that came with the computer. This effect
never occured on my old computer, though; it was a Power Mac 7100/80.

Is this Apple's bug, Power Computing's problem or mine? And what's the
easiest fix/workaround? I thought about making a fake arrow cursor,
switching to it, then switching back to Apple's arrow--this would force a
cursor redraw without having any perceptible change. However, talk about a
crude hack! :(

*Stiles

+++++++++++++++++++++++++++

>From highrisk@best.com (Michael Kelly)
Date: 24 Sep 1996 10:53:22 -0700
Organization: High Risk Ventures, Inc.

>> Anyway, my software (Skittles) has one weird glitch. Doing a gamma fade
>> while in Thousands of Colors invariably causes the white edging around the
>> arrow cursor to turn solid black. This makes the cursor both ugly and hard
>> to see. The easy workaround is to change the cursor to some other shape
>> then turn it back, but this isn't exactly pretty (it would probably make a
>> weird flicker). It doesn't happen in 256 colors. (However, it does happen
>> if a gamma fade occurs at thousands of colors, the screen mode is changed
>> to 256 colors, then the screen is faded back in.)
>
>We ran into a similar problem when we did IndyCar Racing II. The solution
>was to hide the cursor during the fade, and reshow it when the fade
>completed.

I have exactly the same problem.  Hiding the cursor before the fade
has no effect for me.  If anyone has another solution, preferably not
involving a cursor-switch hack, I'd love to hear it.

-- 
| Michael A. Kelly                  High Risk Ventures, Inc |
| President                                    PO Box 70690 |
| mkelly@hrvinc.com                        Eugene, OR 97401 |
| http://www.hrvinc.com                      (415) 359-4176 |

+++++++++++++++++++++++++++

>From cconway@ea.com (Chris Conway)
Date: Tue, 24 Sep 1996 11:46:17 -0700
Organization: Electronic Arts

In article <jstiles-2309962033230001@105.0.102.32.128.in-addr.arpa>,
jstiles@uclink4.berkeley.edu (John Stiles) wrote:

> I have a new PowerCenter 150 with somewhat accelerated video (it's got the
> same QuickDraw acceleration chip as a 7200 does). I'm not sure if the
> acceleration chip is the cause of my problem, but it might shed some
> light. 
> 
> Anyway, my software (Skittles) has one weird glitch. Doing a gamma fade
> while in Thousands of Colors invariably causes the white edging around the
> arrow cursor to turn solid black. This makes the cursor both ugly and hard
> to see. The easy workaround is to change the cursor to some other shape
> then turn it back, but this isn't exactly pretty (it would probably make a
> weird flicker). It doesn't happen in 256 colors. (However, it does happen
> if a gamma fade occurs at thousands of colors, the screen mode is changed
> to 256 colors, then the screen is faded back in.)

I've had the same problem in Shockwave 1 and 2.  The problem only happens
for me on PowerMac 7500, 8500, and on my PowerTower Pro 225 (only on the
monitor driven by the IMS TwinTurbo video card--when I play the game on
the monitor that is driven by an ATI card, it looks fine).

It seems to be related to the video card/hardware (possibly on cards that
support a hardware mouse?).  Hiding the cursor does not fix the problem
for me.  For me, it happens in both thousands and 256-color mode.  The
problem will continue on that monitor until I change the color depth or
resolution of the monitor with the Monitors control panel.  Even after I
quit the game, whenever I move the cursor from the "good" monitor to the
"bad" monitor, the cursor changes to all black!

Any info would be appreciated.

Thanks,
Chris Conway
Electronic Arts

+++++++++++++++++++++++++++

>From farrier@apple.com (Cary Farrier)
Date: Tue, 24 Sep 1996 16:14:58 -0800
Organization: Apple Computer, Inc.

The problem is that when the display mode is changed, the video
subsystem is taking the color palette entries from the faded CLUT
and popping them into the hardware cursor's CLUT.  The only way
to avoid this is to reprogram the cursor, which is a bit of a hack.
That is what DrawSprocket does if a mode change occurs while the
palette is fully faded out.

-> Cary

-- 
- --------------------------------------------------------------------
Cary Farrier, aka Mr. Draw Sprocket
Software Engineer, Apple Game Technology Group
farrier@apple.com
Visit the Apple Games Website at <http://dev.info.apple.com/games>

+++++++++++++++++++++++++++

>From jstiles@uclink4.berkeley.edu (John Stiles)
Date: Tue, 24 Sep 1996 16:27:42 -0800
Organization: University of California, Berkeley

> > Anyway, my software (Skittles) has one weird glitch. Doing a gamma fade
> > while in Thousands of Colors invariably causes the white edging around the
> > arrow cursor to turn solid black. This makes the cursor both ugly and hard
> > to see. The easy workaround is to change the cursor to some other shape
> > then turn it back, but this isn't exactly pretty (it would probably make a
> > weird flicker). It doesn't happen in 256 colors. (However, it does happen
> > if a gamma fade occurs at thousands of colors, the screen mode is changed
> > to 256 colors, then the screen is faded back in.)
> We ran into a similar problem when we did IndyCar Racing II. The solution
> was to hide the cursor during the fade, and reshow it when the fade
> completed.

I tried this already. Hiding the cursor has no effect at all. :( I think
it might depend on which kind of video card you have.

*Stiles
